<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="easyui-layout" fit="true">
	<div data-options="region:'center'" style="border: 0">
		<h1>试卷预览</h1>
		<div class="div_normal">试卷预览，点击题干可以换同一范围内的其他试题</div>
		<fieldset class="fs">
			<legend>基本信息</legend>
			<div class="left">
				<div class="exam_info">【试卷名称】：TR09-${ct.name}</div>
				<div class="exam_info">【出卷人】： ${ct.emp.name}</div>
				<div class="exam_info">【有效时间】：${ct.startTime} - ${ct.endTime}</div>
				<div class="exam_info">【选择题数】：${ct.chooseCount}道题</div>
				<div class="exam_info">【判断题数】：${ct.opinionCount}道题</div>
				<div class="exam_info">【编程与简答题数】：${ct.programCount}道题</div>
				<div class="exam_info">【学习阶段】： ${zj[0].dagang.name}</div>
				<div class="exam_info">
					【章节】：
					<c:forEach items="${zj}" var="z">
	   					《${z.name}》
	   			</c:forEach>
				</div>
				<div class="exam_info">
					【派发部门】：
					<c:forEach items="${ct.cla}" var="c">
	   				${c.className}
	   			</c:forEach>

				</div>
				<div class="exam_info">【说明】：</div>
			</div>
		</fieldset>
		<div>
			<input type="hidden" id="zjid" value="${zj[0].id}" />
			<c:if test="${not empty choice}">
				<fieldset
					style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
					<legend style="font-weight: bold; padding-bottom: 10px;">选择题(共${choice.size()})题</legend>
					<c:if test="${ct.chooseCount > choice.size()}">
						<div class="tip">
							<u>注：题库试题不够，您申请了${ct.chooseCount}道题，但符合条件的只有${choice.size()}道题</u>
						</div>
					</c:if>
					<ol type="1" class="borderw" style="padding-left: 40px;">
						<c:forEach items="${choice}" var="c" varStatus="states">
							<li class="li_question">
								<div class="question_title">
									<a name="m1470"></a>
									${states.index+1}、${c.title}(选${c.answer.length()}项) <span
										class="correct_answer"></span>
								</div>
								<ol type="A">
									<li>A、${c.optionA}</li>
									<li>B、${c.optionB}</li>
									<li>C、${c.optionC}</li>
									<li>D、${c.optionD}</li>
								</ol>
							</li>
						</c:forEach>
					</ol>
				</fieldset>
			</c:if>

			<c:if test="${not empty option}">
				<fieldset
					style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
					<legend style="font-weight: bold; padding-bottom: 10px;"">判断题(共${option.size()})题</legend>
					<c:if test="${ct.opinionCount > option.size()}">
						<div class="tip">
							<u>注：题库试题不够，您申请了${ct.opinionCount}道题，但符合条件的只有${option.size()}道题</u>
						</div>
					</c:if>
					<ol type="1" class="borderw" style="padding-left: 40px;">
						<c:forEach items="${option}" var="o" varStatus="states">
							<li class="li_question">
								<div class="question_title">
									${states.index+1}、${o.title}<span class="correct_answer"></span>
								</div>
							</li>
						</c:forEach>
					</ol>
				</fieldset>
			</c:if>
			<c:if test="${not empty program}">
				<fieldset
					style="border: none; width: 96%; margin-top: 10px; margin-left: 20px;">
					<legend style="font-weight: bold; padding-bottom: 10px;"">编程题(共${program.size()})题</legend>
					<c:if test="${ct.programCount > program.size()}">
						<div class="tip">
							<u>注：题库试题不够，您申请了${ct.programCount}道题，但符合条件的只有${program.size()}道题</u>
						</div>
					</c:if>
					<ol type="1" class="borderw" style="padding-left: 40px;">
						<c:forEach items="${program}" var="p" varStatus="states">
							<li class="li_question">
								<div class="question_title">
									<a name="m648"></a> ${states.index+1}、${p.title}
								</div>
							</li>
						</c:forEach>
					</ol>
				</fieldset>
			</c:if>
		</div>
	</div>
	<a id="btn-return"
		style="position: absolute; right: 57px; bottom: 12px;" href="#"
		class="easyui-linkbutton" data-options="iconCls:'icon-add'">返回</a> <a
		id="btn-save" style="position: absolute; right: 123px; bottom: 12px;"
		href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'">生成练习</a>
</div>
<script src="public/js/publish-exercises.js"></script>
